﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Point {

	public int X;
	public int Y;

	public float FX;
	public float FY;

	public Point(){
	}

	public Point(int x, int y){
		this.X = x;
		this.Y = y;
	}

	public Point(Point point){
		this.X = point.X;
		this.Y = point.Y;
	}

	public void Set(int x, int y){
		this.X = x;
		this.Y = y;
	}

	public override int GetHashCode(){
		int result = 17;
		result = result * 31 + X;
		result = result * 31 + Y;
		return result;
	}

	public override bool Equals(object obj){
		if (this == obj)
			return true;
		if (obj==null || !(obj is Point))
			return false;
		Point o = (Point)obj;
		if (X == o.X && Y == o.Y)
			return true;
		return false;
	}
}
